home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / gengetopt-2.6.lha / gengetopt-2.6 / aclocal.m4 < prev    next >
M4 Source File  |  2001-12-31  |  8KB  |  258 lines

  1. dnl aclocal.m4 generated automatically by aclocal 1.4
  2.  
  3. dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  4. dnl This file is free software; the Free Software Foundation
  5. dnl gives unlimited permission to copy and/or distribute it,
  6. dnl with or without modifications, as long as this notice is preserved.
  7.  
  8. dnl This program is distributed in the hope that it will be useful,
  9. dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  10. dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. dnl PARTICULAR PURPOSE.
  12.  
  13. dnl Copyright (C) 1998 Eleftherios Gkioulekas <lf@amath.washington.edu>
  14. dnl  
  15. dnl This program is free software; you can redistribute it and/or modify
  16. dnl it under the terms of the GNU General Public License as published by
  17. dnl the Free Software Foundation; either version 2 of the License, or
  18. dnl (at your option) any later version.
  19. dnl 
  20. dnl This program is distributed in the hope that it will be useful,
  21. dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  23. dnl GNU General Public License for more details.
  24. dnl 
  25. dnl You should have received a copy of the GNU General Public License
  26. dnl along with this program; if not, write to the Free Software 
  27. dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  28. dnl 
  29. dnl As a special exception to the GNU General Public License, if you distribute
  30. dnl this file as part of a program that contains a configuration script 
  31. dnl generated by Autoconf, you may include it under the same distribution 
  32. dnl terms that you use for the rest of that program.
  33.  
  34. AC_DEFUN(LF_PROG_TXTC,[
  35.   AC_MSG_CHECKING(for the txtc compiler)
  36.   TXTC='$(SHELL) $(top_builddir)/txtc.sh'
  37.   if test -f $srcdir/txtc.sh.in
  38.   then
  39.     AC_MSG_RESULT(yes)  
  40.   else
  41.     AC_MSG_RESULT(no)
  42.     AC_MSG_WARN([Cannot find the txtc.sh compiler.])
  43.     AC_MSG_WARN([Please use the mktxtc utility to generate one at the]), 
  44.     AC_MSG_WARN([toplevel directory, otherwise this package will not compile.])
  45.   fi
  46.   AC_SUBST(TXTC)
  47. ])
  48.  
  49. dnl @synopsis AC_COMPILE_WARNINGS
  50. dnl
  51. dnl Set the maximum warning verbosity according to compiler used.
  52. dnl Currently supports g++ and gcc.
  53. dnl This macro must be put after AC_PROG_CC and AC_PROG_CXX in
  54. dnl configure.in
  55. dnl
  56. dnl @version $Id: acinclude.m4,v 1.2 2001/02/09 18:17:14 bettini Exp $
  57. dnl @author Loic Dachary <loic@senga.org>
  58. dnl
  59. AC_DEFUN(AC_COMPILE_WARNINGS,
  60. [AC_MSG_CHECKING(maximum warning verbosity option)
  61. if test -n "$CXX"
  62. then
  63.   if test "$GXX" = "yes"
  64.   then
  65.     ac_compile_warnings_opt='-Wall'
  66.   fi
  67.   CXXFLAGS="$CXXFLAGS $ac_compile_warnings_opt"
  68.   ac_compile_warnings_msg="$ac_compile_warnings_opt for C++"
  69. fi
  70.  
  71. if test -n "$CC"
  72. then
  73.   if test "$GCC" = "yes"
  74.   then
  75.     ac_compile_warnings_opt='-Wall'
  76.   fi
  77.   CFLAGS="$CFLAGS $ac_compile_warnings_opt"
  78.   ac_compile_warnings_msg="$ac_compile_warnings_msg $ac_compile_warnings_opt for C"
  79. fi
  80. AC_MSG_RESULT($ac_compile_warnings_msg)
  81. unset ac_compile_warnings_msg
  82. unset ac_compile_warnings_opt
  83. ])
  84.  
  85. dnl Copyright (C) 2001 Lorenzo Bettini <bettini@gnu.org>
  86. dnl  
  87. dnl This program is free software; you can redistribute it and/or modify
  88. dnl it under the terms of the GNU General Public License as published by
  89. dnl the Free Software Foundation; either version 2 of the License, or
  90. dnl (at your option) any later version.
  91.  
  92. dnl @synopsis AC_NONGNU_FLAGS
  93. dnl
  94. dnl check if the non-GNU C compiler accepts -Aa (HP-UX)
  95.  
  96. AC_DEFUN(AC_NONGNU_FLAGS,
  97. [
  98.   if test -z "$GCC"; then
  99.     AC_CC_AA_FLAG
  100.     if test $ac_cv_cc_aa_flag = yes; then
  101.       CFLAGS="$CFLAGS -Aa"
  102.     fi
  103.   fi
  104. ])
  105.  
  106. dnl @synopsis AC_CC_AA_FLAG
  107. dnl
  108. dnl check if the C compiler accepts -Aa (HP-UX)
  109.  
  110. AC_DEFUN(AC_CC_AA_FLAG,
  111. [AC_CACHE_CHECK(whether ${CC-cc} accepts -Aa, ac_cv_cc_aa_flag,
  112. [echo 'void f(){}' > conftest.c
  113. if test -z "`${CC-cc} -Aa -c conftest.c 2>&1`"; then
  114.   ac_cv_cc_aa_flag=yes
  115. else
  116.   ac_cv_cc_aa_flag=no
  117. fi
  118. rm -f conftest*
  119. ])])
  120.  
  121. # Like AC_CONFIG_HEADER, but automatically create stamp file.
  122.  
  123. AC_DEFUN(AM_CONFIG_HEADER,
  124. [AC_PREREQ([2.12])
  125. AC_CONFIG_HEADER([$1])
  126. dnl When config.status generates a header, we must update the stamp-h file.
  127. dnl This file resides in the same directory as the config header
  128. dnl that is generated.  We must strip everything past the first ":",
  129. dnl and everything past the last "/".
  130. AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
  131. ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
  132. <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
  133. <<am_indx=1
  134. for am_file in <<$1>>; do
  135.   case " <<$>>CONFIG_HEADERS " in
  136.   *" <<$>>am_file "*<<)>>
  137.     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
  138.     ;;
  139.   esac
  140.   am_indx=`expr "<<$>>am_indx" + 1`
  141. done<<>>dnl>>)
  142. changequote([,]))])
  143.  
  144. # Do all the work for Automake.  This macro actually does too much --
  145. # some checks are only needed if your package does certain things.
  146. # But this isn't really a big deal.
  147.  
  148. # serial 1
  149.  
  150. dnl Usage:
  151. dnl AM_INIT_AUTOMAKE(package,version, [no-define])
  152.  
  153. AC_DEFUN(AM_INIT_AUTOMAKE,
  154. [AC_REQUIRE([AC_PROG_INSTALL])
  155. PACKAGE=[$1]
  156. AC_SUBST(PACKAGE)
  157. VERSION=[$2]
  158. AC_SUBST(VERSION)
  159. dnl test to see if srcdir already configured
  160. if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  161.   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  162. fi
  163. ifelse([$3],,
  164. AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  165. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
  166. AC_REQUIRE([AM_SANITY_CHECK])
  167. AC_REQUIRE([AC_ARG_PROGRAM])
  168. dnl FIXME This is truly gross.
  169. missing_dir=`cd $ac_aux_dir && pwd`
  170. AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
  171. AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
  172. AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
  173. AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
  174. AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
  175. AC_REQUIRE([AC_PROG_MAKE_SET])])
  176.  
  177. #
  178. # Check to make sure that the build environment is sane.
  179. #
  180.  
  181. AC_DEFUN(AM_SANITY_CHECK,
  182. [AC_MSG_CHECKING([whether build environment is sane])
  183. # Just in case
  184. sleep 1
  185. echo timestamp > conftestfile
  186. # Do `set' in a subshell so we don't clobber the current shell's
  187. # arguments.  Must try -L first in case configure is actually a
  188. # symlink; some systems play weird games with the mod time of symlinks
  189. # (eg FreeBSD returns the mod time of the symlink's containing
  190. # directory).
  191. if (
  192.    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  193.    if test "[$]*" = "X"; then
  194.       # -L didn't work.
  195.       set X `ls -t $srcdir/configure conftestfile`
  196.    fi
  197.    if test "[$]*" != "X $srcdir/configure conftestfile" \
  198.       && test "[$]*" != "X conftestfile $srcdir/configure"; then
  199.  
  200.       # If neither matched, then we have a broken ls.  This can happen
  201.       # if, for instance, CONFIG_SHELL is bash and it inherits a
  202.       # broken ls alias from the environment.  This has actually
  203.       # happened.  Such a system could not be considered "sane".
  204.       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
  205. alias in your environment])
  206.    fi
  207.  
  208.    test "[$]2" = conftestfile
  209.    )
  210. then
  211.    # Ok.
  212.    :
  213. else
  214.    AC_MSG_ERROR([newly created file is older than distributed files!
  215. Check your system clock])
  216. fi
  217. rm -f conftest*
  218. AC_MSG_RESULT(yes)])
  219.  
  220. dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
  221. dnl The program must properly implement --version.
  222. AC_DEFUN(AM_MISSING_PROG,
  223. [AC_MSG_CHECKING(for working $2)
  224. # Run test in a subshell; some versions of sh will print an error if
  225. # an executable is not found, even if stderr is redirected.
  226. # Redirect stdin to placate older versions of autoconf.  Sigh.
  227. if ($2 --version) < /dev/null > /dev/null 2>&1; then
  228.    $1=$2
  229.    AC_MSG_RESULT(found)
  230. else
  231.    $1="$3/missing $2"
  232.    AC_MSG_RESULT(missing)
  233. fi
  234. AC_SUBST($1)])
  235.  
  236.  
  237. dnl AM_PROG_LEX
  238. dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
  239. AC_DEFUN(AM_PROG_LEX,
  240. [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
  241. AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
  242. AC_PROG_LEX
  243. AC_DECL_YYTEXT])
  244.  
  245. # Define a conditional.
  246.  
  247. AC_DEFUN(AM_CONDITIONAL,
  248. [AC_SUBST($1_TRUE)
  249. AC_SUBST($1_FALSE)
  250. if $2; then
  251.   $1_TRUE=
  252.   $1_FALSE='#'
  253. else
  254.   $1_TRUE='#'
  255.   $1_FALSE=
  256. fi])
  257.  
  258.